package com.nbsaas.boot.order.data.repository;

import com.nbsaas.boot.order.data.entity.Order;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;
import java.io.Serializable;
import java.math.BigDecimal;

public interface OrderRepository  extends  JpaRepositoryImplementation<Order, Serializable>{

    @Query("SELECT SUM(o.amount) FROM Order o")
    BigDecimal sumAmount();

}